package cn.zymall.order.dao;

import cn.zymall.common.model.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: mall
 * @description: 评论持久层
 * @author: YueNiao
 * @email: 1486617253@qq.com
 * @create: 2020-08-25 10:04
 **/
@Repository
public interface CommentMapper extends BaseMapper<Comment> {
	/**
	 * 查询全部
	 * @param userId
	 * @return
	 */
	List<Comment> findAll(@Param("userId") String userId,@Param("status") String status);

	/**
	 * 模糊查询
	 * @param userId
	 * @param value
	 * @return
	 */
	List<Comment> moFindAll(@Param("userId") String userId,@Param("status") String status,@Param("value") String value);

	/**
	 * 店铺评论
	 * @param merchantId
	 * @param userId
	 * @param status
	 * @return
	 */
	List<Comment> merchantFindAll(@Param("merchantId")String merchantId,@Param("userId") String userId, @Param("status")String status);

	/**
	 * 店铺评论模糊
	 * @param merchantId
	 * @param userId
	 * @param status
	 * @param value
	 * @return
	 */
	List<Comment> moMerchantFindAll(@Param("merchantId")String merchantId,@Param("userId") String userId,@Param("status") String status, @Param("value")String value);
}
